home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="iso-8859-1"?>
- <dialog width="400" height="190" caption="Word/sentence">
- <controls>
- <panel name="mainpanel" caption="" align="alclient" bevelinner="bvnone" bevelouter="bvnone">
- </panel>
- </controls>
- <dialogevents>
- <event type="onclose" resulttype="ok">
- StartCode := '<span';
- If edtCSSClass.Text <> '' then
- StartCode := StartCode + ' class="'+edtCSSClass.Text+'"';
- If edtCSSId.Text <> '' then
- StartCode := StartCode + ' ID="'+edtCSSId.Text+'"';
- If edtCSSStyle.Text <> '' then
- StartCode := StartCode + ' style="'+edtCSSStyle.Text+'"';
- for i := 0 to EventGrid.Count - 1 do
- begin
- if EventGrid.Rows[i].EditText <> '' then
- StartCode := StartCode + ' ' + (EventGrid.Rows[i].Caption+'="' + EventGrid.Rows[i].EditText)+'"';
- end;
- StartCode := StartCode + '>';
- EndCode := '</span>';
- If cbMakeXHTMLCompliant.Checked then
- StartCode := MakeXHTMLCompliant(StartCode, true);
- If cbDoPHPEscape.Checked then
- StartCode := DoPHPEscape(StartCode);
- // A little "hack" - WebCoder will set this, to let us know whether to update
- // an existing tag, or insert a brand new one
- If cbUpdateExistingTag.Checked then
- ReplaceTag(StartCode)
- else
- InsertTags(StartCode, EndCode);
-
- </event>
- <event type="onshow">
- // Lets put the advanced panel in the right place
- pnlAdvanced.Parent := MainPanel;
- pnlAdvanced.Left := 8;
- pnlAdvanced.Top := MainPanel.Height - 32;
- pnlAdvanced.Width := Self.Width - 36;
- // Height of the panel will be set internally. Do we need to make the dialog higher to make room for the Advanced panel?
- If pnlAdvanced.Height > 20 then
- Self.Height := Self.Height + 200;
- Self.ActiveControl := MainPanel;
- MainPanel.SetFocus;
- </event>
- <event type="updatedialog">
- // This event will be called when a user executes the "Edit current tag"-rightclick feature
- // The entire selected tag will be passed as a parameter to this function, that should update
- // the required fields of the dialog.
- function UpdateDialog(Tag: string);
- begin
- edtCSSClass.Text := GetValueFromAttribute(Tag, 'class');
- edtCSSId.Text := GetValueFromAttribute(Tag, 'id');
- edtCSSStyle.Text := GetValueFromAttribute(Tag, 'style');
- for i := 0 to EventGrid.Count - 1 do
- begin
- EventVal := GetValueFromAttribute(Tag, Lowercase(EventGrid.Rows[i].Caption));
- If EventVal <> '' then
- EventGrid.Rows[i].EditText := EventVal;
- end;
- cbDoPHPEscape.Checked := IsPHPEscaped(Tag);
- cbMakeXHTMLCompliant.Checked := isXHTMLDocument();
- end;
- </event>
- </dialogevents>
- </dialog>
-